subroutine wtraj(ss,step,y)
use var
use type
implicit none
integer :: step, ss, y, iout
character*20 :: string = "traj frame"

iout = 200 + 1
call RANDOM_SEED(get = iseed(1:2))
write(iout)string
write(iout)frame,ss,step,y
write(iout)ISEED    
write(iout)trj_E
write(iout)NP_position
write(iout)q
frame = frame + 1
trj_E = 0.d0
end subroutine

